//
//  OAApprovelistCell.m
//  OA项目
//
//  Created by innofive on 2018/4/14.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "OAApprovelistCell.h"


//列表cell
@interface OAApprovelistCell()
@property(nonatomic,strong) UILabel *label1;
@property(nonatomic,strong) UILabel *label2;
@property(nonatomic,strong) UILabel *label3;
@property(nonatomic,strong) UILabel *label4;

@end

@implementation OAApprovelistCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
   // self.backgroundColor = [UIColor whiteColor];
    
    
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.text = @"刘花花 调休1天";
        l.font = kSysFont(kFitW(12));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        l.text = @"待审批";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label3 = ({
        UILabel *l = [UILabel new];
        l.text = @"2017.11.29 09:30-2017.11.30 18:30";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label4 = ({
        UILabel *l = [UILabel new];
        l.text = @"结婚";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(15);
        
        [label2 sizeToFit];
        label2.right  = size.width-kFitW(10);
        label2.top = kFitH(15);
        
        
        [label3 sizeToFit];
        label3.left  =kFitW(10);
        label3.top = label1.bottom+kFitH(10);
        
        
        [label4 sizeToFit];
        label4.left  =kFitW(10);
        label4.top = label3.bottom+kFitH(10);
        
    }];
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    
}

@end

@implementation OATravellistCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
  
   UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.text =@"李金 出差常州、石家庄 4天";
        l.font = kSysFont(kFitW(12));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        l.text = @"待审批";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label3 = ({
        UILabel *l = [UILabel new];
        l.text = @"常州 周三9:00 到周四 18:00";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label4 = ({
        UILabel *l = [UILabel new];
        l.text = @"石家庄1月12日9:00到15日18:00";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label5 = ({
        UILabel *l = [UILabel new];
        l.text = @"客户现场演示";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(15);
        
        [label2 sizeToFit];
        label2.right  = size.width-kFitW(10);
        label2.top = kFitH(15);
        
        
        [label3 sizeToFit];
        label3.left  =kFitW(10);
        label3.top = label1.bottom+kFitH(10);
        
        
        [label4 sizeToFit];
        label4.left  =kFitW(10);
        label4.top = label3.bottom+kFitH(10);
        
        [label5 sizeToFit];
        label5.left  =kFitW(10);
        label5.top = label4.bottom+kFitH(10);
        
    }];
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    
}

@end

@implementation OAAddWorklistCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.text =@"刘花花工作日加班5小时";
        l.font = kSysFont(kFitW(12));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        l.text = @"待审批";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label3 = ({
        UILabel *l = [UILabel new];
        l.text = @"周二17:11到22:11";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label4 = ({
        UILabel *l = [UILabel new];
        l.text = @"SEM推进";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(15);
        
        [label2 sizeToFit];
        label2.right  = size.width-kFitW(10);
        label2.top = kFitH(15);
        
        
        [label3 sizeToFit];
        label3.left  =kFitW(10);
        label3.top = label1.bottom+kFitH(10);
        
        
        [label4 sizeToFit];
        label4.left  =kFitW(10);
        label4.top = label3.bottom+kFitH(10);
        
    }];
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    
}

@end






@interface OAApproveDetailsCell()
@property(nonatomic,strong)UILabel * label1;
@property(nonatomic,strong)UILabel * label2;
@end
//详情cell
@implementation OAApproveDetailsCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    // self.backgroundColor = [UIColor whiteColor];
    if (indexPath.row==1||indexPath.row==9||indexPath.row==11)
    {
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        //l.text = @"待审批";
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label2 = label2;
//    UILabel *label3 = ({
//        UILabel *l = [UILabel new];
//        l.text = @"2017.11.29 09:30-2017.11.30 18:30";
//        l.font = kSysFont(kFitW(12));
//        l.textColor = hexCOLOR(@"9D9D9D");
//        [view addV:l];
//        l;
//    });

    CGFloat w = [NSString calculateLabelWidth:@"提交片时间" font:kSysFont(kFitW(13)) AndHeight:kFitH(15)];
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.centerY = size.height/2;
        
        [label2 sizeToFit];
        label2.left  = w+kFitW(20);
        label2.centerY = size.height/2;
        
        
//        [label3 sizeToFit];
//        label3.left  =kFitW(10);
//        label3.top = label1.bottom+kFitH(10);
    
        
    }];
}

-(void)update:(NSDictionary *)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    _label1.text = model[@"name1"];
    _label2.text = model[@"name2"];
}

@end



//详情cell3<同意,驳回>
@implementation OAApproveDetailsCell3
-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    self.backgroundColor = [UIColor clearColor];
    
     self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UIButton *btn = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"驳回" forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        l.backgroundColor = hexCOLOR(@"EE523A");
        l.cornerRadius = 3;
        l.masksToBounds = YES;
        l.tag = 10;
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
    
    
    UIButton *btn1 = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"同意" forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        l.backgroundColor = hexCOLOR(@"00AC5D");
        l.cornerRadius = 3;
        l.masksToBounds = YES;
        l.tag = 20;
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
    
    
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {

        CGFloat w = (size.width-kFitW(74))/2;
        
        btn1.size = CGSizeMake(w, kFitH(40));
        btn1.left =kFitW(22);
        btn1.top = kFitH(20);
        
        btn.size = CGSizeMake(w, kFitH(40));
        btn.right =size.width-kFitW(22);
        btn.top = kFitH(20);
        
    }];
    
}
@end





//详情cell3<同意,驳回>
@implementation OAApproveDetailsCell3_0
-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    self.backgroundColor = [UIColor clearColor];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UIButton *btn = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"驳回" forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        [l setNormalTitleColor:[UIColor whiteColor]];
        l.backgroundColor = hexCOLOR(@"FFE7CF");
        l.cornerRadius = 3;
        l.masksToBounds = YES;
        l.tag = 10;
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
  
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        CGFloat w = (size.width-kFitW(74))/2;
        btn.size = CGSizeMake(w, kFitH(40));
        btn.centerX =size.width/2;
        btn.top = kFitH(20);
        
    }];
    
}
@end


@interface OAApproveDetailsCell4()
@property(nonatomic,strong)UILabel * label1;
@property(nonatomic,strong)UILabel * label2;
@property(nonatomic,strong)UILabel * label3;
@end
//详情cell4<假别>
@implementation OAApproveDetailsCell4

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
   
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        //l.text = @"待审批";
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label2 = label2;
        UILabel *label3 = ({
            UILabel *l = [UILabel new];
            l.font = kSysFont(kFitW(12));
            l.textColor = hexCOLOR(@"999899");
            [view addV:l];
            l;
        });
     _label3 = label3;
    
    CGFloat w = [NSString calculateLabelWidth:@"提交片时间" font:kSysFont(kFitW(13)) AndHeight:kFitH(15)];
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(10);
        
        [label2 sizeToFit];
        label2.left  = w+kFitW(20);
        label2.top = kFitH(10);
        
        
        [label3 sizeToFit];
        label3.left  =w+kFitW(20);
        label3.top = label2.bottom+kFitH(10);
        
        
    }];
}

-(void)update:(NSDictionary *)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    _label1.text = model[@"name1"];
    _label2.text = model[@"name2"];
    _label3.text = model[@"name3"];
}

@end
//详情cell4<事由>

@implementation OAApproveDetailsCell5

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    [super onAsInitAddView:view forViewController:ViewController forDataSource:dataSource AtIndexPath:indexPath ];
    
    CGFloat w = [NSString calculateLabelWidth:@"提交片时间" font:kSysFont(kFitW(13)) AndHeight:kFitH(15)];
    WSELF(weakSelf);
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [weakSelf.label1 sizeToFit];
        weakSelf.label1.left  = kFitW(10);
        weakSelf.label1.top = kFitH(10);
        
        [weakSelf.label2 sizeToFit];
        weakSelf.label2.left  = w+kFitW(20);
        weakSelf.label2.top = kFitH(10);
        
    }];
}
@end


@implementation OAApproveDetailsCell1

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    self.backgroundColor = [UIColor clearColor];
}
@end

//电子交易列表Cell
@interface OADianZiJiaoYilistCell()
@property(nonatomic,strong)UILabel *label1;
@property(nonatomic,strong)UILabel *label2;
@property(nonatomic,strong)UILabel *label3;
@property(nonatomic,strong)UIButton *btn1;
@end
@implementation OADianZiJiaoYilistCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        l.text = @"广州微斯人企业管理咨询服务有限公司";
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        l.text = @"待审批";
        l.font = kSysFont(kFitW(13));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    _label2 = label2;
    UILabel *label3 = ({
        UILabel *l = [UILabel new];
        l.text = @"招标代理合同";
        l.font = kSysFont(kFitW(12));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label3 = label3;
    
    UILabel *label4 = ({
        UILabel *l = [UILabel new];
        l.text = @"招标人:广汽本田汽车服务公司";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label5 = ({
        UILabel *l = [UILabel new];
        l.text = @"2017.11.29 09:30";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UIButton *btn1 = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"驳回" forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        //l.backgroundColor = hexCOLOR(@"EE523A");
        l.borderWidth = 0.5;
        l.borderColor = hexCOLOR(@"979797");
        [l setNormalTitleColor:hexCOLOR(@"979797")];
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
    _btn1 = btn1;
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(10);
        
        [label2 sizeToFit];
        label2.right  = size.width-kFitW(10);
        label2.top = kFitH(10);
        
        [label3 sizeToFit];
        label3.left  =kFitW(10);
        label3.top = label1.bottom+kFitH(10);
    
        [label4 sizeToFit];
        label4.left  =kFitW(10);
        label4.top = label3.bottom+kFitH(10);
        
        [label5 sizeToFit];
        label5.left  =kFitW(10);
        label5.top = label4.bottom+kFitH(10);
        
        btn1.size = CGSizeMake(kFitW(65), kFitH(30));
        btn1.right =size.width-kFitW(10);
        btn1.bottom = size.height-kFitH(20);
        
        
    }];
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    _btn1.hidden = [model integerValue];
}
@end

//电子交易列表Cell
@interface OACarlistCell()
@property(nonatomic,strong)UILabel *label1;
@property(nonatomic,strong)UILabel *label2;
@property(nonatomic,strong)UILabel *label3;
@end
@implementation OACarlistCell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        l.text = @"用车申请";
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        l.text = @"待审批";
        l.font = kSysFont(kFitW(13));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    _label2 = label2;
    UILabel *label3 = ({
        UILabel *l = [UILabel new];
        l.text = @"周一用车天津投递标书";
        l.font = kSysFont(kFitW(12));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label3 = label3;
  

    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(10);
        
        [label2 sizeToFit];
        label2.right  = size.width-kFitW(10);
        label2.top = kFitH(10);
        
        [label3 sizeToFit];
        label3.left  =kFitW(10);
        label3.top = label1.bottom+kFitH(10);
        

    }];
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{

}
@end


@interface OADissentComplaintslistCell()
@property(nonatomic,strong)UILabel *label1;
@property(nonatomic,strong)UILabel *label2;
@property(nonatomic,strong)UILabel *label3;
@end

@implementation OADissentComplaintslistCell
-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        l.text = @"广州微斯人企业管理咨询服务有限公司";
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        l.text = @"待审批";
        l.font = kSysFont(kFitW(13));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    _label2 = label2;
    UILabel *label3 = ({
        UILabel *l = [UILabel new];
        l.text = @"标段编号:035656562526626";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"8D8D8D");
        [view addV:l];
        l;
    });
    _label3 = label3;
    
    UILabel *label4 = ({
        UILabel *l = [UILabel new];
    l.text = @"2017.11.29 09:30";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    UILabel *label5 = ({
        UILabel *l = [UILabel new];
        l.text = @"函件分类:投诉";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"9D9D9D");
        [view addV:l];
        l;
    });
    
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.top = kFitH(10);
        
        [label2 sizeToFit];
        label2.right  = size.width-kFitW(10);
        label2.top = kFitH(10);
        
        [label3 sizeToFit];
        label3.left  =kFitW(10);
        label3.top = label1.bottom+kFitH(10);
        
        [label4 sizeToFit];
        label4.left  =kFitW(10);
        label4.top = label3.bottom+kFitH(10);
        
        [label5 sizeToFit];
        label5.left  =kFitW(10);
        label5.top = label4.bottom+kFitH(10);
     
    }];
}

@end





@interface OADissentComplaintsDetails1Cell()
@property(nonatomic,strong)UILabel * label1;
@property(nonatomic,strong)UILabel * label2;
@end
//详情cell
@implementation OADissentComplaintsDetails1Cell

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    UILabel *label2 = ({
        UILabel *l = [UILabel new];
        //l.text = @"待审批";
        l.font = kSysFont(kFitW(13));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label2 = label2;

    CGFloat w = [NSString calculateLabelWidth:@"标段(包)名称" font:kSysFont(kFitW(13)) AndHeight:kFitH(15)];
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        
        [label1 sizeToFit];
        label1.left  = kFitW(10);
        label1.centerY = size.height/2;
        
        [label2 sizeToFit];
        label2.left  = w+kFitW(40);
        label2.centerY = size.height/2;

    }];
}

-(void)update:(NSDictionary *)model forTableView:(UITableView *)tableView AtIndexPath:(NSIndexPath *)indexPath
{
    _label1.text = model[@"name1"];
    _label2.text = model[@"name2"];
}

@end



@interface OADissentComplaintsDetailsCell()
@end

@implementation OADissentComplaintsDetailsCell
-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    self.backgroundColor = [UIColor clearColor];
    UIButton *btn = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"返回" forState:UIControlStateNormal];
        [l setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        l.backgroundColor = hexCOLOR(@"FFE3C6");
        l.tag = 10;
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        btn.size = CGSizeMake(kFitW(110),kFitH(28));
        btn.centerX =size.width/2;
        btn.centerY = size.height/2;
    }];
}
@end



@interface OAApprovelistFooder()
@property(nonatomic,strong)UILabel *label1;
@property(nonatomic,strong)UIButton *btn;
@property(nonatomic,strong)UIButton *btn2;
@end

@implementation OAApprovelistFooder

-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtSection:(NSInteger)section
{
 
    
    [self addTarget:ViewController action:@selector(onSelectFooder:)];
    
    UIView *bjView = ({
        UIView *l = [UIView new];
        l.backgroundColor = [UIColor whiteColor];
        [view addV:l];
        l;
    });
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.text = @"下一审批人:小小";
        l.font = kSysFont(kFitW(12));
        l.textColor = [UIColor blackColor];
        [view addV:l];
        l;
    });
    _label1 = label1;
    
    
    UIButton *btn = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"同意" forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        l.backgroundColor = hexCOLOR(@"00AC5D");
        l.tag = 10;
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
    _btn = btn;
    
    UIButton *btn1 = ({
        UIButton *l= [UIButton buttonWithType:UIButtonTypeCustom];
        [l setTitle:@"驳回" forState:UIControlStateNormal];
        l.titleLabel.font = kSysFont(kFitW(12));
        l.backgroundColor = hexCOLOR(@"EE523A");
        l.tag = 20;
        [l addTarget:ViewController action:@selector(onClick:) forControlEvents:UIControlEventTouchUpInside];
        [view addSubview:l];
        l;
    });
    
_btn2 = btn1;
    
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
    
        bjView.frame = CGRectMake(0, 0, size.width, size.height-kFitH(10));
        
        [label1 sizeToFit];
        label1.left = kFitW(10);
        label1.top =0;
        
        btn1.size = CGSizeMake(kFitW(65), kFitH(30));
        btn1.right =size.width-kFitW(20);
        btn1.bottom = size.height-kFitH(20);
        
        btn.size = CGSizeMake(kFitW(65), kFitH(30));
        btn.right =btn1.left-kFitW(20);
        btn.bottom = size.height-kFitH(20);
        
    }];
    
    
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtSection:(NSInteger)section
{
    self.section =section;
}

@end


@implementation OAAddWorklistFooder


-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtSection:(NSInteger)section
{
    
    [super onAsInitAddView:view forViewController:ViewController forDataSource:dataSource AtSection:section];
    
    self.label1.textColor = hexCOLOR(@"9D9D9D");
    
}

-(void)update:(NSNumber *)model forTableView:(UITableView *)tableView AtSection:(NSInteger)section
{
    if ([model integerValue]==YES) {
        self.btn.hidden=YES;
        self.btn2.hidden=YES;
        
    }
    else
    {
        if (section%2==0) {
            self.btn.hidden=YES;
            self.btn2.hidden=YES;
        }else
        {
            self.btn.hidden=NO;
            self.btn2.hidden=NO;
        }
    }
}

@end


@implementation OAExpenseslistFooder


-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtSection:(NSInteger)section
{
    
    [super onAsInitAddView:view forViewController:ViewController forDataSource:dataSource AtSection:section];
    
    
    self.label1.textColor = hexCOLOR(@"9D9D9D");
    
    self.btn.hidden = YES;
    
    self.btn2.backgroundColor = [UIColor whiteColor];
    self.btn2.borderWidth = 0.5;
    self.btn2.borderColor = hexCOLOR(@"979797");
    [self.btn2 setNormalTitleColor:hexCOLOR(@"979797")];

    
}

-(void)update:(id)model forTableView:(UITableView *)tableView AtSection:(NSInteger)section
{

}

@end

